package com.iee.common.entity;

import lombok.Data;

import java.util.Objects;

/**
 * @ClassName Student
 * @Description TODO
 * @Author longxiaonan@163.com
 * @Date 2019/9/5 0005 23:44
 */
@Data
public class Student {
    public Student(Integer id, String name, Integer age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(id, student.id) &&
                Objects.equals(name, student.name) &&
                Objects.equals(password, student.password) &&
                Objects.equals(number, student.number) &&
                Objects.equals(age, student.age) &&
                Objects.equals(sex, student.sex);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, password, number, age, sex);
    }

    private Integer id;
    private String name;
    private String password;
    private Short number;
    private Integer age;
    private String sex;
    public Student() {

    }
}
